home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 December / MACPOWER-1997-12.ISO.7z / MACPOWER-1997-12.ISO / AMUG / PROGRAMMING / Raven 1.2.sit / Raven 1.2 / Source / Foundation / Common / ZTrace.h < prev    next >
Text File  |  1997-06-18  |  1KB  |  61 lines

  1. /*
  2.  *  File:       ZTrace.h
  3.  *  Summary:    A class that allows flexible control over what debug
  4.  *                output is printed.
  5.  *  Written by: Jesse Jones
  6.  *
  7.  *  Copyright ゥ 1996 Jesse Jones. 
  8.  *    For conditions of distribution and use, see copyright notice in ZTypes.h  
  9.  *
  10.  *  Change History (most recent first):    
  11.  *
  12.  *          <->     1/16/96        JDJ        created
  13.  */
  14.  
  15. #pragma once
  16.  
  17. #if DEBUG
  18.  
  19. #include <String>
  20.  
  21. #include <ZTypes.h>
  22.  
  23.  
  24. // ===================================================================================
  25. //    class UTraceFlow
  26. // ===================================================================================
  27. class UTraceFlow {
  28.  
  29. public:
  30.     static     void         EnableCategory(const string& category);
  31.                         // See cpp for a list of the categories in Raven and the ones that 
  32.                         // are enabled by default.
  33.         
  34.     static     void         DisableCategory(const string& category);
  35.     
  36.     static     bool         IsCategoryEnabled(const string& category);
  37.     
  38.     
  39.     static     ulong         GetNumCategories();
  40.     
  41.     static     void        ResetCursor();
  42.             
  43.     static     string        GetNextCategory();
  44.             
  45.     static     bool        CursorAtEnd();
  46.     
  47.     
  48.     static     void         Trace(const string& mesg);
  49.                         // Note that these functions optionally echo everything to a file.
  50.     
  51.     static     void         TraceFlow(const string& category, const string& mesg);
  52.     
  53.     
  54.     static bool    msEchoToSIOUX;
  55.     static bool    msEchoToFile;
  56.     static bool    msEchoAllToFile;            // if true disabled TRACEFLOW categories get echoed to the debug file
  57. };
  58.  
  59.  
  60. #endif    // DEBUG
  61.